class Easing3 extends egret.DisplayObjectContainer {
    private ball:Ball
    private easing:number = 0.5
    private targetX:number
    private targetY:number

    private diffX:number
    private diffY:number

    public constructor() {
        super()
        this.once( egret.Event.ADDED_TO_STAGE, this.onAddToStage, this)
    }

    private onAddToStage(event:egret.Event) {
        this.targetX = 100
        this.ball = new Ball()
        this.ball.touchEnabled = true
        this.addChild(this.ball)
        this.ball.x = 0

        for (let i = 0; i < 20; i++) {
            console.log(i + ":" + this.ball.x)
            this.ball.x += (this.targetX - this.ball.x) * this.easing
        }
    }
}